#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QWidget>
#include <QLineEdit>
#include <QTextEdit>
#include <QPushButton>
#include <QString>


class AddressBook: public QWidget
{
    Q_OBJECT
public:
    AddressBook(QWidget *parent=0);
public slots:
    void addContact();
    void submitContact();
    void cancel();

private:
    QPushButton *addButton;
    QPushButton *submitButton;
    QPushButton *cancelButton;
    QLineEdit *nameLine;
    QTextEdit *addressText;
    QMap<QString,QString> contacts;
    QString oldName;
    QString oldAddress;
};

#endif // MAINWINDOW_H
